RANDOMIZE TIMER
DO
INPUT "vvedite kolichestvo strok n: ", n
INPUT "vvedite kolichestvo stolbcov m: ", m
LOOP UNTIL n >= 3 AND m >= 3
DIM a(n, m), y(n)
FOR i = 1 TO n
FOR j = 1 TO m
a(i, j) = INT(RND * 21) - 10
NEXT
NEXT
PRINT "matrica: "
FOR i = 1 TO n
FOR j = 1 TO m
PRINT a(i, j);
NEXT
PRINT
NEXT
FOR i = 1 TO n
max = a(i, 1)
FOR j = 2 TO m
IF a(i, j) > max THEN max = a(i, j)
NEXT
y(i) = max
NEXT
PRINT STRING$(80, 196)
PRINT "massiv y:"
FOR i = 1 TO n
PRINT y(i);
NEXT
Тестирование выполнено в программе QB64 ( Скачать )